These summaries are based on data at the block group level from the years 1980-2020. Data are also available at the block, tract, and county levels.
meta %>%
filter(su_blkgp == 1) %>%
select(varname, about) %>% as.list()
## $varname
## [1] "STATEFP" "COUNTYFP" "GEOID" "NAMESLAD"
## [5] "CountyName" "year" "June_AvgMaxTF" "July_AvgMaxTF"
## [9] "August_AvgMaxTF" "AvgAnnMaxTemp" "TotpercInch"
##
## $about
## [1] "The federal information processing system (FIPS) codes which are used to identify a geographical location, Virginia is 51"
## [2] "The federal information processing system (FIPS) codes which are used to identify a geographical location, each county has a 3 digit code."
## [3] "The georgraphical ID number of an observation. It is the comnbination of the state FIPS, county FIPS, and the tract, and blockgroup numbers."
## [4] "The georgraphical ID number of an observation"
## [5] "County Name"
## [6] "The data covers years 1980 through 2020"
## [7] "The average maximum temperature for a daily period over the entire monthly period for the month of June. Converted to Fahrenheit during data clean"
## [8] "The average maximum temperature for a daily period over the entire monthly period for the month of July. Converted to Fahrenheit during data clean"
## [9] "The average maximum temperature for a daily period over the entire monthly period for the month of August. Converted to Fahrenheit during data clean"
## [10] "The average maximum temperature for a daily period over the entire year. Converted to Fahrenheit during data clean"
## [11] "The total accumulated precipitation over the monthly period of the daily total precipitation, summed into total yearly precipitation. Sum of all forms of precipitation converted to a water-equivalent depth. Converted to inches during data clean"
glimpse(cvldat)
## Rows: 246
## Columns: 10
## $ GEOID <int> 51003, 51003, 51003, 51003, 51003, 51003, 51003, 51003, …
## $ year <int> 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 19…
## $ STATEFP <int> 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, …
## $ COUNTYFP <int> 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,…
## $ NAMELSAD <chr> "Albemarle County", "Albemarle County", "Albemarle Count…
## $ June_AvgMaxTF <dbl> 82.61, 85.41, 79.71, 82.82, 86.22, 81.83, 86.28, 85.32, …
## $ July_AvgMaxTF <dbl> 89.09, 85.08, 85.64, 89.89, 83.12, 85.08, 89.46, 90.43, …
## $ Aug_AvgMaxTF <dbl> 88.34, 83.20, 82.05, 89.26, 84.36, 82.72, 81.57, 87.64, …
## $ AvgAnnMaxTF <dbl> 66.73, 65.99, 66.21, 66.38, 66.96, 67.42, 67.26, 66.89, …
## $ TotpercInch <dbl> 36.17, 38.77, 43.59, 52.46, 52.75, 50.84, 36.66, 50.11, …
cvldat %>% select(June_AvgMaxTF, July_AvgMaxTF, Aug_AvgMaxTF, AvgAnnMaxTF, TotpercInch) %>%
select(where(~is.numeric(.x))) %>%
as.data.frame() %>%
stargazer(., type = "text", title = "Summary Statistics", digits = 2,
summary.stat = c("mean", "sd", "min", "median", "max"))
##
## Summary Statistics
## ===============================================
## Statistic Mean St. Dev. Min Median Max
## -----------------------------------------------
## June_AvgMaxTF 83.40 2.19 77.40 83.40 88.86
## July_AvgMaxTF 87.11 2.61 80.32 87.24 92.36
## Aug_AvgMaxTF 85.20 2.62 79.76 85.26 91.08
## AvgAnnMaxTF 67.20 1.56 62.88 67.21 70.66
## TotpercInch 46.86 9.05 30.62 46.64 81.44
## -----------------------------------------------
These distributions show data at the block group level from the years 1980-2020. Data are also available at the block, tract, and county levels.
longdat <- cvldat %>% select(c(GEOID, June_AvgMaxTF, July_AvgMaxTF, Aug_AvgMaxTF, AvgAnnMaxTF, TotpercInch)) %>% pivot_longer(-GEOID, names_to = "measure", values_to = "value")
longdat$measure <- factor(longdat$measure,
levels = c("June_AvgMaxTF", "July_AvgMaxTF", "Aug_AvgMaxTF", "AvgAnnMaxTF", "TotpercInch"))
longdat %>%
ggplot(aes(x = value, fill = measure)) +
scale_fill_viridis(option = "plasma", discrete = TRUE, guide = FALSE) +
geom_histogram() +
facet_wrap(~measure, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
meta %>%
filter(varname %in% c("June_AvgMaxTF", "July_AvgMaxTF", "Aug_AvgMaxTF", "AvgAnnMaxTF", "TotpercInch")) %>%
mutate(label = paste0(varname, ": ", about)) %>%
select(label) %>%
as.list()
$label [1] "June_AvgMaxTF: The average maximum temperature for a daily period over the entire monthly period for the month of June. Converted to Fahrenheit during data clean"
[2] "July_AvgMaxTF: The average maximum temperature for a daily period over the entire monthly period for the month of July. Converted to Fahrenheit during data clean"
[3] "TotpercInch: The total accumulated precipitation over the monthly period of the daily total precipitation, summed into total yearly precipitation. Sum of all forms of precipitation converted to a water-equivalent depth. Converted to inches during data clean"
All of the following maps show data from the year 2020, but data are available for years 1980-2020.
mapdat2020 <- mapdat[which(mapdat$year == 2020),]
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat2020$AvgAnnMaxTF)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat2020,
fillColor = ~pal(mapdat2020$AvgAnnMaxTF),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T),
popup = paste0("GEOID: ", mapdat2020$GEOID, "<br>",
"Temperature in Fahrenhiet: ", mapdat2020$AvgAnnMaxTF)) %>%
leaflet::addLegend("bottomright", pal = pal, values = (mapdat2020$AvgAnnMaxTF),
title = "Average annual <br> temperature <br> in Fahrenheit <br> in 2020", opacity = 0.7)
Monhtly summaries are also available for June and July.
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat2020$Aug_AvgMaxTF)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat2020,
fillColor = ~pal(mapdat2020$Aug_AvgMaxTF),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T),
popup = paste0("GEOID: ", mapdat2020$GEOID, "<br>",
"Temperature in Fahrenhiet: ", mapdat2020$Aug_AvgMaxTF)) %>%
leaflet::addLegend("bottomright", pal = pal, values = (mapdat2020$Aug_AvgMaxTF),
title = "Average August max <br> temperature <br> in Fahrenheit <br> in 2020", opacity = 0.7)
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat2020$TotpercInch)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat2020,
fillColor = ~pal(mapdat2020$TotpercInch),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T
),
popup = paste0("GEOID: ", mapdat2020$GEOID, "<br>",
"Precipitation in Inches: ", mapdat2020$TotpercInch)
) %>%
leaflet::addLegend("bottomright", pal = pal, values = (mapdat2020$TotpercInch),
title = "Annual precipitation <br>in Inches <br>in 2020", opacity = 0.7)
dygraph(cville_sf1x, main = "Average maximum annual temperature for each county over time", ylab = "Temperature (F)") %>%
dySeries("Greene", label = "Greene") %>%
dySeries("Albemarle", label = "Albemarle") %>%
dySeries("Charlottesville", label = "Charlottesville") %>%
dySeries("Fluvanna", label = "Fluvanna") %>%
dySeries("Louisa", label = "Louisa") %>%
dySeries("Nelson", label = "Nelson") %>%
dyHighlight(highlightCircleSize = 3,
highlightSeriesBackgroundAlpha = 0.2,
hideOnMouseOut = FALSE, highlightSeriesOpts = list(strokeWidth = 3)) %>%
dyLegend(show = "always", hideOnMouseOut = FALSE, width = 400) %>%
dyRangeSelector(height = 20) %>% dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2"))
dygraph(cville_sf1x, main = "Average maximum August temperature for each county over time", ylab = "Temperature (F)") %>%
dySeries("Greene", label = "Greene") %>%
dySeries("Albemarle", label = "Albemarle") %>%
dySeries("Charlottesville", label = "Charlottesville") %>%
dySeries("Fluvanna", label = "Fluvanna") %>%
dySeries("Louisa", label = "Louisa") %>%
dySeries("Nelson", label = "Nelson") %>%
dyHighlight(highlightCircleSize = 3,
highlightSeriesBackgroundAlpha = 0.2,
hideOnMouseOut = FALSE, highlightSeriesOpts = list(strokeWidth = 3)) %>%
dyLegend(show = "always", hideOnMouseOut = FALSE, width = 400) %>%
dyRangeSelector(height = 20) %>% dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2"))
dygraph(cville_sf1x, main = "Annual precipitation for each county over time", ylab = "Precipitation (In)") %>%
dySeries("Greene", label = "Greene") %>%
dySeries("Albemarle", label = "Albemarle") %>%
dySeries("Charlottesville", label = "Charlottesville") %>%
dySeries("Fluvanna", label = "Fluvanna") %>%
dySeries("Louisa", label = "Louisa") %>%
dySeries("Nelson", label = "Nelson") %>%
dyHighlight(highlightCircleSize = 3,
highlightSeriesBackgroundAlpha = 0.2,
hideOnMouseOut = FALSE, highlightSeriesOpts = list(strokeWidth = 3)) %>%
dyLegend(show = "always", hideOnMouseOut = FALSE, width = 400) %>%
dyRangeSelector(height = 20) %>% dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2"))